package com.example.administrator.testdagger;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;

import com.example.administrator.testdagger.Co.CoAty;
import com.example.administrator.testdagger.bigpic.LargeImageView;
import com.example.administrator.testdagger.design.TestDesignActivity;
import com.example.administrator.testdagger.design.proxy.TestProxyActivity;
import com.example.administrator.testdagger.mvp.TestMvpAty;
import com.example.administrator.testdagger.tview.CustomActivity;

import java.io.IOException;
import java.io.InputStream;

import javax.inject.Inject;

import static com.example.administrator.testdagger.R.*;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    LargeImageView mIv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        findViewById(R.id.tv_design).setOnClickListener(this);
        findViewById(R.id.tv_custom).setOnClickListener(this);
        findViewById(R.id.tv_proxy).setOnClickListener(this);
//        startActivity(new Intent(this, CoAty.class));

//        try {
//            InputStream is = getAssets().open("world.jpg");
//            mIv.setInputStrean(is);
//        } catch (IOException e) {
//            e.printStackTrace();
//        }

    }

    @Override
    public void onClick(View v) {
        int id = v.getId();
        switch (id) {
            case R.id.tv_design:
                startActivity(new Intent(this, TestDesignActivity.class));
                break;
            case R.id.tv_custom:
                startActivity(new Intent(this, CustomActivity.class));
                break;
            case R.id.tv_proxy:
                startActivity(new Intent(this, TestProxyActivity.class));
                break;
        }
    }
}
